<?
//inculde即可以使用data数据。本页所有的data数据，倾在controller都处理好
include_once("../../../common/modules/checkA.php");
include_once("../../../../config.php");
include_once("../controller/detail-edit.php");
?>


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <link href="../css/<? echo $theme_folder ?>/user.css" rel="stylesheet" type="text/css"/>
    <?php include ROOT_PATH_.'/controller/common/modules/head.php'; ?>
    <?php include 'modules/head.php'; ?>

    <!--kindeditor编辑器-->
    <link rel="stylesheet" href="../../keditor/themes/default/default.css"/>
    <script charset="utf-8" src="../../keditor/kindeditor-all.js"></script>
    <script charset="utf-8" src="../../keditor/lang/zh_CN.js"></script>

    <script>
        var editor;
        KindEditor.ready(function (K) {
            editor = K.create('textarea[name="ai_content"]', {
                allowFileManager:true,
                afterBlur: function () { editor.sync(); },
                allowFileManager: true,
                filterMode : false,
            });

            editor.options.filterMode = false;

        });

        KindEditor.ready(function (K) {
            editor2 = K.create('textarea[name="ai_finnsh_content"]', {
                allowFileManager:true,
                afterBlur: function () { editor.sync(); },
                allowFileManager: true,
                filterMode : false,
            });

            editor2.options.filterMode = false;

        });

        KindEditor.ready(function (K) {
            editor3 = K.create('textarea[name="ai_user_notice"]', {
                allowFileManager:true,
                afterBlur: function () { editor.sync(); },
                allowFileManager: true,
                filterMode : false,
            });

            editor3.options.filterMode = false;

        });

        KindEditor.ready(function (K) {
            editor4 = K.create('textarea[name="ai_user_agreement"]', {
                allowFileManager:true,
                afterBlur: function () { editor.sync(); },
                allowFileManager: true,
                filterMode : false,
            });

            editor4.options.filterMode = false;

        });

    </script>
</head>


<body>

<div id="topbar">
    <?php include ROOT_PATH_.'/controller/common/modules/topbar.php'; ?>
</div>

<div id="container" class="<? echo $system_part ?>">

    <div id="maincontent">

        <div id="sidebar">
            <?php include ROOT_PATH_.'/controller/common/modules/sidebar.php'; ?>
        </div>






<div id="content" class="layui-form">
	<div class="box member-add-box layui-form">
<h1>修改文章</h1>

<form id="add-employee-form" method="post" action="detail-edit-function.php?sys_part=activity" enctype="multipart/form-data" class="layui-form">



    <fieldset class="layui-elem-field layui-field-title">
        <legend> 基本资料</legend>
    </fieldset>



    <?php include 'mod-images-upload.php';

    ?>
    <input type="hidden" name="nid" value="<?php echo $info['nid']?>" />
    <div class="layui-form-item">
        <label class="layui-form-label">文章标题</label>
        <div class="layui-input-block">
            <input type="text" name="ai_name" lay-verify="required" placeholder="文章标题" autocomplete="off" class="layui-input" value="<?php echo $info['name'];?>">
        </div>
    </div>


    <div class="layui-form-item">
        <label class="layui-form-label">活动详情</label>
        <div class="layui-input-block">
            <textarea name="ai_content" style="width:800px;height:400px;visibility:hidden;"><?php echo $info['content']?></textarea><em class="explain"></em>

        </div>
    </div>

    <div class="layui-form-item">
        <label class="layui-form-label">发布</label>
        <div class="layui-input-block">
            <input type="radio" name="ai_status" value="0" title="否" <?php if($info['status'] == '0'){ echo 'checked="checked"';}?>>
            <input type="radio" name="ai_status" value="1" title="是" <?php if($info['status'] == '1'){ echo 'checked="checked"';}?>>
        </div>
    </div>

    <div class="layui-form-item">
        <label class="layui-form-label">置顶</label>
        <div class="layui-input-block">
            <input type="radio" name="ai_top" value="0" title="否" <?php if($info['top'] == '0'){ echo 'checked="checked"';}?>>
            <input type="radio" name="ai_top" value="1" title="是" <?php if($info['top'] == '1'){ echo 'checked="checked"';}?>>
        </div>
    </div>


    <div class="layui-form-item">
        <label class="layui-form-label">置顶排序</label>
        <div class="layui-input-block">
            <input type="text" name="ai_top_order" value="<?php echo $info['top_order']?>" class="layui-input" >

        </div>
    </div>

    <div class="layui-form-item">
        <label class="layui-form-label">跳转</label>
        <div class="layui-input-block">
            <select name="ai_informant"  lay-search="" >
                <option value="">无</option>
                <option value="pages/news/detail" <? echo $info['path'] == 'pages/news/detail' ? 'selected' : '' ?>>文章：pages/news/detail</option>
                <option value="pages/activity/detail" <? echo $info['path'] == 'pages/activity/detail' ? 'selected' : '' ?> >活动：pages/activity/detail</option>
            </select>
        </div>
    </div>

    <div class="layui-form-item">
        <label class="layui-form-label">跳转id</label>
        <div class="layui-input-block">
            <input type="text" name="ai_path_id" lay-verify="required" placeholder="跳转id" autocomplete="off" class="layui-input" value="<?php echo $info['path_id'];?>">
        </div>
    </div>






        <div class="layui-form-item  ">
           <div class="layui-input-block">
              <button class="layui-btn" lay-submit lay-filter="formMemberAdd" type="submit">立即提交</button>
              <button type="reset" class="layui-btn layui-btn-primary">重置</button>
           </div>
        </div>



</form>
</div>
<!--maincontent端點01-->
<br class="clearfloat"/>
</div>
<!--container端點01-->
</div>


<?php include ROOT_PATH_ . "/controller/common/modules/footer.php"; ?> </body>
</html>
